3 subject="""comment 1"""
4 date="2023-04-24T15:13:35Z"
6 The next release is going to escape and quote filenames that contain
7 special characters similarly to how git does. (But json will not be affected due
8 to already being escaped.)
10 This will affect filenames output in error messages. So if you are
11 parsing error messages or non-json output with filenames that contain
12 characters that need to be escaped, you will need to deal with the
15 See [[todo/terminal_escapes_in_filenames]] for the full details of this
18 One thing I noticed about your example is that git-annex add doesn't display
19 that particular filename the same as git add does:
21 joey@darkstar:~/tmp/xxx>git-annex add 'gl\orious'
22 git-annex: "gl\\orious" not found
23 joey@darkstar:~/tmp/xxx>git add 'gl\orious'
24 fatal: pathspec 'gl\orious' did not match any files
26 But, that is an inconsistency in git itself. More commonly it uses the same
27 display as git-annex for this filename:
29 joey@darkstar:~/tmp/xxx>touch 'gl\orious'
30 joey@darkstar:~/tmp/xxx>git add 'gl\orious'
31 joey@darkstar:~/tmp/xxx>git diff --cached
32 diff --git "a/gl\\orious" "b/gl\\orious"
34 index 0000000..e69de29
36 So I don't think there's a problem with git-annex's behavior here. With
37 that said, we can talk about adding something to make back-compatability
38 easy for you, or whatever. An config like core.quotePath but that also
39 affects special characters, not just unicode, for example.